#Include constants.ahk

class DrawData {

  static d := []

  static pop() => this.d.Length && this.d.Pop()

  static putLine(x1, y1, x2, y2, c, penW) {
    this.d.Push({
      type: DrawType.LINE,
      coord: [x1, y1, x2, y2],
      color: c,
      penW: penW
    })
    return this.d.Length
  }

  static putRect(x, y, w, h, c, penW) {
    this.d.Push({
      type: DrawType.RECT,
      coord: [x, y, w, h],
      color: c,
      penW: penW
    })
    return this.d.Length
  }

  static putRectSolid(x, y, w, h, c) {
    this.d.Push({
      type: DrawType.RECT_SOLID,
      coord: [x, y, w, h],
      color: c
    })
    return this.d.Length
  }

  static putByType(type, params*) {
    switch type {
      case DrawType.LINE: return this.putLine(params*)
      case DrawType.RECT: return this.putRect(params*)
      case DrawType.RECT_SOLID: return this.putRectSolid(params*)
    }
  }
}

class BaseType {

  move() {
    
  }
}